package com.ruoyi.project.lely.bean.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import javax.validation.constraints.Digits;
import org.hibernate.validator.constraints.Length;

/**
 * 购物车
 *
 * @author luoyong
 */
@Data
@ApiModel("购物车 入参DTO")
public class LyCartDTO {

    @ApiModelProperty("ID")
    private Long id;

    @ApiModelProperty("用户表的用户ID")
    private Integer userId;

    @ApiModelProperty("入驻品牌商编码")
    private Integer brandId;

    @ApiModelProperty("商品表的商品ID")
    private Integer goodsId;

    @Length(max = 63, message = "商品编号长度不能超过63位")
    @ApiModelProperty("商品编号")
    private String goodsSn;

    @Length(max = 127, message = "商品名称长度不能超过127位")
    @ApiModelProperty("商品名称")
    private String goodsName;

    @ApiModelProperty("商品货品表的货品ID")
    private Integer productId;

    @Digits(integer = 10 - 2, fraction = 2)
    @ApiModelProperty("商品货品的价格")
    private BigDecimal price;

    @ApiModelProperty("商品货品的数量")
    private Integer number;

    @Length(max = 1023, message = "商品规格值列表，采用JSON数组格式长度不能超过1023位")
    @ApiModelProperty("商品规格值列表，采用JSON数组格式")
    private String specifications;

    @ApiModelProperty("购物车中商品是否选择状态")
    private Integer checked;

    @Length(max = 255, message = "商品图片或者商品货品图片长度不能超过255位")
    @ApiModelProperty("商品图片或者商品货品图片")
    private String picUrl;

    @Digits(integer = 10 - 2, fraction = 2)
    @ApiModelProperty("代理结算佣金")
    private BigDecimal settlementMoney;

}
